package com.handu.luna.core.domain.user;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.handu.luna.core.domain.BaseRepository;

public interface UserLogRepository extends JpaRepository<UserLog,Long>, BaseRepository<UserLog>,JpaSpecificationExecutor<UserLog>{
	
	@Query("from UserLog s  where s.userId = :userId order by id desc")
	Page<UserLog> findByUserId(@Param("userId") long userId,Pageable pageable);

}
